Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix __version__ mishandled by versioneer when generating git archives #100

Merged
merged 8 commits into from
Dec 23, 2024

Conversation

conda-forge-admin
Copy link
Contributor

@conda-forge-admin conda-forge-admin commented Dec 13, 2024

Hi! This is the friendly automated conda-forge-webservice.

I've started rerendering the recipe as instructed in #99.

If I find any needed changes to the recipe, I'll push them to this PR shortly. Thank you for waiting!

Here's a checklist to do before merging.

Fixes #99
xref: NVIDIA/cuda-python#308

@conda-forge-admin
Copy link
Contributor Author

conda-forge-admin commented Dec 13, 2024

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/meta.yaml:

  • ℹ️ The recipe is not parsable by parser conda-souschef (grayskull). Your recipe may not receive automatic updates and/or may not be compatible with conda-forge's infrastructure. Please check the logs for more information and ensure your recipe can be parsed.
  • ℹ️ The recipe is not parsable by parser conda-recipe-manager. Your recipe may not receive automatic updates and/or may not be compatible with conda-forge's infrastructure. Please check the logs for more information and ensure your recipe can be parsed.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12309442179. Examine the logs at this URL for more detail.

@conda-forge-admin
Copy link
Contributor Author

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you but ran into some issues. Please check the output logs of the GitHub Actions workflow below for more details. You can also ping conda-forge/core (using the @ notation) for further assistance or you can try rerendering locally.

The following suggestions might help debug any issues:

  • Is the recipe/{meta.yaml,recipe.yaml} file valid?
  • If there is a recipe/conda-build-config.yaml file in the feedstock make sure that it is compatible with the current global pinnnings.
  • Is the fork used for this PR on an organization or user GitHub account? Automated rerendering via the webservices admin bot only works for user GitHub accounts.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12308580391. Examine the logs at this URL for more detail.

@leofang leofang changed the title MNT: rerender Fix __version__ contaminated by versioneer due to local patch Dec 13, 2024
@leofang leofang marked this pull request as ready for review December 13, 2024 02:54
@leofang
Copy link
Member

leofang commented Dec 13, 2024

@conda-forge-admin, please rerender

@conda-forge-admin
Copy link
Contributor Author

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you but ran into some issues. Please check the output logs of the GitHub Actions workflow below for more details. You can also ping conda-forge/core (using the @ notation) for further assistance or you can try rerendering locally.

The following suggestions might help debug any issues:

  • Is the recipe/{meta.yaml,recipe.yaml} file valid?
  • If there is a recipe/conda-build-config.yaml file in the feedstock make sure that it is compatible with the current global pinnnings.
  • Is the fork used for this PR on an organization or user GitHub account? Automated rerendering via the webservices admin bot only works for user GitHub accounts.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12308888227. Examine the logs at this URL for more detail.

@leofang
Copy link
Member

leofang commented Dec 13, 2024

It seems every few weeks I need to catch up with the latest conda-forge development... I suspect this has to do with the global pinning updated to 12.6, but I can't tell what's the right solution. Time to ping @conda-forge/cuda 😄

INFO:conda_smithy.configure_feedstock:Downloading conda-forge-pinning-2024.12.12.18.06.52
INFO:conda_smithy.configure_feedstock:Extracting conda-forge-pinning to /tmp/tmp7lj7ehdq/conda-smithy
INFO:conda_smithy.configure_feedstock:README rendering is skipped
INFO:conda_smithy.configure_feedstock:__pycache__ rendering is skipped
INFO:conda_smithy.configure_feedstock:python313.yaml from feedstock is ignored and upstream version is used
WARNING: Setting build platform. This is only useful when pretending to be on another platform, such as for rendering necessary dependencies on a non-native platform. I trust that you know what you're doing.
WARNING: Setting build arch. This is only useful when pretending to be on another arch, such as for rendering necessary dependencies on a non-native arch. I trust that you know what you're doing.
WARNING: No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.23
Adding in variants from internal_defaults
Adding in variants from /tmp/tmp7lj7ehdq/conda-smithy/conda_build_config.yaml
INFO:conda_smithy.configure_feedstock:Applying migrations: /tmp/tmp7lj7ehdq/conda-smithy/share/conda-forge/migrations/python313.yaml,/tmp/tmpym4rgkqg/cuda-python-feedstock/.ci_support/migrations/cuda12x.yaml
Traceback (most recent call last):
  File "/opt/conda/envs/cf-feedstock-ops/bin/conda-smithy", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/cli.py", line 767, in main
    args.subcommand_func(args)
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/cli.py", line 610, in __call__
    self._call(args, args.temporary_directory)
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/cli.py", line 613, in _call
    configure_feedstock.main(
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 2881, in main
    render_azure(env, config, forge_dir, return_metadata=True)
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 1901, in render_azure
    return _render_ci_provider(
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 1071, in _render_ci_provider
    migrated_combined_variant_spec = migrate_combined_spec(
                                     ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 902, in migrate_combined_spec
    combined_spec = variant_add(combined_spec, migration)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/variant_algebra.py", line 289, in variant_add
    return VARIANT_OP[operation](v1, v2)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/variant_algebra.py", line 176, in op_variant_key_add
    new_keys = variant_key_set_union(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/variant_algebra.py", line 114, in variant_key_set_union
    return sorted(out_v, key=partial(_version_order, ordering=ordering))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/variant_algebra.py", line 65, in _version_order
    return ordering.index(v)
           ^^^^^^^^^^^^^^^^^
ValueError: '12.6' is not in list
2024-12-13 03:15:08,221 ERROR    conda_forge_webservices.github_actions_integration.rerendering || Rerendering failed: Error running 'conda-forge-feedstock-ops-container rerender --log-level debug' in container - error RuntimeError raised:
'Failed to rerender.
output: Adding in variants from internal_defaults
Adding in variants from /tmp/tmp7lj7ehdq/conda-smithy/conda_build_config.yaml
INFO:conda_smithy.configure_feedstock:Downloading conda-forge-pinning-2024.12.12.18.06.52
INFO:conda_smithy.configure_feedstock:Extracting conda-forge-pinning to /tmp/tmp7lj7ehdq/conda-smithy
INFO:conda_smithy.configure_feedstock:README rendering is skipped
INFO:conda_smithy.configure_feedstock:__pycache__ rendering is skipped
INFO:conda_smithy.configure_feedstock:python313.yaml from feedstock is ignored and upstream version is used
WARNING: Setting build platform. This is only useful when pretending to be on another platform, such as for rendering necessary dependencies on a non-native platform. I trust that you know what you're doing.
WARNING: Setting build arch. This is only useful when pretending to be on another arch, such as for rendering necessary dependencies on a non-native arch. I trust that you know what you're doing.
WARNING: No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.23
INFO:conda_smithy.configure_feedstock:Applying migrations: /tmp/tmp7lj7ehdq/conda-smithy/share/conda-forge/migrations/python313.yaml,/tmp/tmpym4rgkqg/cuda-python-feedstock/.ci_support/migrations/cuda12x.yaml
Traceback (most recent call last):
  File "/opt/conda/envs/cf-feedstock-ops/bin/conda-smithy", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/cli.py", line 767, in main
    args.subcommand_func(args)
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/cli.py", line 610, in __call__
    self._call(args, args.temporary_directory)
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/cli.py", line 613, in _call
    configure_feedstock.main(
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 2881, in main
    render_azure(env, config, forge_dir, return_metadata=True)
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 1901, in render_azure
    return _render_ci_provider(
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 1071, in _render_ci_provider
    migrated_combined_variant_spec = migrate_combined_spec(
                                     ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 902, in migrate_combined_spec
    combined_spec = variant_add(combined_spec, migration)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/variant_algebra.py", line 289, in variant_add
    return VARIANT_OP[operation](v1, v2)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/variant_algebra.py", line 176, in op_variant_key_add
    new_keys = variant_key_set_union(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/variant_algebra.py", line 114, in variant_key_set_union
    return sorted(out_v, key=partial(_version_order, ordering=ordering))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_smithy/variant_algebra.py", line 65, in _version_order
    return ordering.index(v)
           ^^^^^^^^^^^^^^^^^
ValueError: '12.6' is not in list

'
2024-12-13 03:15:08,224 INFO     conda_forge_webservices.github_actions_integration.utils || git patch for diff e64ab497653144c5d153871489da97d828907f35..e64ab497653144c5d153871489da97d828907f35: 

@jakirkham
Copy link
Member

@conda-forge-admin , please re-render

@jakirkham
Copy link
Member

@conda-forge-admin , please re-render

@conda-forge-admin
Copy link
Contributor Author

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12309444583. Examine the logs at this URL for more detail.

@jakirkham jakirkham force-pushed the conda_forge_admin_99 branch from 596e7a2 to d0788e8 Compare December 13, 2024 04:14
@conda-forge-admin
Copy link
Contributor Author

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

Copy link
Member

@leofang leofang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leofang leofang marked this pull request as draft December 22, 2024 21:24
@leofang
Copy link
Member

leofang commented Dec 22, 2024

__version__ is still dirty...
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1107951&view=logs&j=d818e662-7181-5ce9-b265-50d03742b7af&t=dc9b07c2-72db-585f-80fc-2b606081ad2b&l=2049

output:

+ python -c 'import cuda.bindings; print(cuda.bindings.__version__)'
0+untagged.310.ge14f0f1.dirty

What happened was that the source dir was extracted as a subdirectory of the feedstock, and since the feedstock is git-source controlled versioneer would look up to the parent directory and find this commit e14f0f1, which explains the version number.

While I still don't understand how we got around of this issue in the past, it becomes clear that we should avoid finding the feedstock's commit.

@leofang
Copy link
Member

leofang commented Dec 23, 2024

While I still don't understand how we got around of this issue in the past

In the latest .post1 versions, get_versions() calls git_pieces_from_vcs() whereas previously it's git_versions_from_keywords() gets called. The reason is that in the past artifacts the git keywords got populated, e.g.:

    git_refnames = " (tag: v12.6.0)"
    git_full = "b9f40f687c583f416b67a6bf067dea85a24c0c24"
    git_date = "2024-08-01 10:42:34 -0700"

whereas those remain unpopulated in the latest artifacts

    git_refnames = "$Format:%d$"
    git_full = "$Format:%H$"
    git_date = "$Format:%ci$"

@leofang
Copy link
Member

leofang commented Dec 23, 2024

@conda-forge-admin, please rerender

@leofang leofang changed the title Fix __version__ contaminated by versioneer due to local patch Fix __version__ mishandled by versioneer when generating git archives Dec 23, 2024
@conda-forge-admin
Copy link
Contributor Author

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12460631185. Examine the logs at this URL for more detail.

@leofang leofang marked this pull request as ready for review December 23, 2024 03:58
@leofang
Copy link
Member

leofang commented Dec 23, 2024

I'll backport this PR to the v11 branch.

@leofang leofang merged commit d6b2c64 into conda-forge:main Dec 23, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@conda-forge-admin, please rerender
3 participants